import request from '@/utils/request'

// 查询红事列表
export function listRedaffair(query) {
  return request({
    url: '/system/redaffair/list',
    method: 'get',
    params: query
  })
}

// 查询红事详细
export function getRedaffair(id) {
  return request({
    url: '/system/redaffair/' + id,
    method: 'get'
  })
}

// 新增红事
export function addRedaffair(data) {
  return request({
    url: '/system/redaffair',
    method: 'post',
    data: data
  })
}

// 修改红事
export function updateRedaffair(data) {
  return request({
    url: '/system/redaffair',
    method: 'put',
    data: data
  })
}

// 删除红事
export function delRedaffair(id) {
  return request({
    url: '/system/redaffair/' + id,
    method: 'delete'
  })
}
